// const arr = []
// arr.push(1)
// arr.splice(0,0,2)
// arr.unshift(3)

// console.log(arr);

// arr.pop()
// arr.splice(0,1)
// arr.shift()

// console.log(arr);

const stack = []  //pop,push
stack.push('钟薛高')
stack.push('小布丁')
stack.push('老布丁')
stack.push('老冰棍')

while(stack.length){
    const top = stack[stack.length - 1]
    console.log('我想吃'+top);
    stack.pop()
}
